home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
bbs
/
pad321.zip
/
USER.MH
< prev
next >
Wrap
Text File
|
1996-08-21
|
1KB
|
48 lines
// (C) 1995 Stefan Xenos
//
// This file contains various functions for manipulating the user list.
//
// Function list:
//
// long findPhone (long: startIdx, Ref struct _usr: u, string: dataPhone, string: voicePhone)
//
// void userInit ();
// bool userToken (string: token, string: params);
//
#ifndef __USER_MH
#define __USER_MH
#ifndef __STRIPNUM_MH
#include "stripnum.mh"
#endif
long findPhone (long: idx, Ref struct _usr: u, string: dataPhone, string: voicePhone) {
long: size;
string: tempData, tempVoice;
stripNonNumeric (dataPhone);
stripNonNumeric (voicePhone);
size := userfilesize ();
for (;idx < size; idx := idx + 1) {
userfindseek (idx, u);
tempData := u.dataphone;
tempVoice := u.phone;
stripNonNumeric (tempData);
stripNonNumeric (tempVoice);
if (((voicePhone <> "") and (voicePhone = tempVoice))
or ((dataPhone <> "") and (dataPhone = tempData))) {
return idx;
};
};
return -1;
}
#endif